<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <script>
      window.onload = function() {
        document.write('浏览器宽:' + window.screen.width + '<br />浏览器高:' + window.screen.height)
      }
      // 奇怪
      console.log(null == false)
      console.log('空对象为 true 吗?', {} == true)
      console.log('不是空对象为 true 吗?', { a: 1 } == true)
      console.log([] == true)
      console.log([true] == true)

      if ({}) console.log('{}') // 输出
      if ({ a: 'p' }) console.log('p')
      if ([]) console.log('[]')
    </script>
  </body>
</html>
